<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/layui-v2.5.5/layui/css/layui.css">
    <link rel="stylesheet" href="/css/admin/index.css">
    {block name="css"}
    <!--css-->
    {/block}
    <script src="/layui-v2.5.5/layui/layui.js"></script>
    <script src="/js/jquery-2.1.1.min.js"></script>
    {block name="js"}
    <!--js-->
    {/block}
    <style>
        #groupadd table{
            margin:0 5vw;
        }
        #groupadd table th{
            width:17vw;
        }
        #groupadd table td{
            text-align: center;
            padding:30px 0 0 0;
        }
        .hidden{
            display:none;
        }
        .exits{
            position: absolute;
            left: 50%;
            top:50%;
            margin-top: -25px;
            margin-left: -100px;
            width:200px;
            height: 50px;
            line-height: 50px;
        }
    </style>
</head>
<body>
<div id="hd" style="position: absolute;width: 100vw;height: 100vh;background: rgba(0,0,0,0.5);z-index: 10;display: none;"></div>
<div id="groupadd" style="background:#fff;border-radius: 10px;z-index:20;position: absolute;width:450px;height: 450px;top:50%;left:50%;margin-left:-225px;margin-top:-225px;display: none;">

        <div>
            <form class="layui-form" action="{:url('classs/add')}" method="post">
            <table id="table_one" class="hidden">
                <div id="table_one_title" style="border-bottom: 2px solid #000;padding:20px 0;margin:0 20px;font-size: 15px;display:none;">添加分组</div>
                <tr>
                    <td><span id="table_name">分组名称：</span></td>
                    <td>
                        <input type="text" name="class" autocomplete="off" class="class hidden">
                        <input type="text" name="table" autocomplete="off" class="table hidden" value="">
                        <input type="text" name="name" autocomplete="off" class="layui-input" placeholder="商品名">
                    </td>
                </tr>
                <tr>
                    <td>排序：</td>
                    <td>
                        <input type="text" name="order" autocomplete="off" class="layui-input" placeholder="排序">
                    </td>
                </tr>
                <tr>
                    <td>是否上架：</td>
                    <td>
                        <div style="margin-left:0;" class="layui-input-block">
                            <input type="radio" name="shelf" value="1" title="是">
                            <input type="radio" name="shelf" value="2" title="否">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <button type="button" class="qx layui-btn">取消</button>
                        <button type="submit" class="addform1 layui-btn">保存</button>
                    </td>
                </tr>
            </table>
            </form>
            <form class="layui-form" action="{:url('user/updatestatus')}" method="post">
            <table id="table_two" class="hidden">
                <div id="table_two_title" style="border-bottom: 2px solid #000;padding:20px 0;margin:0 20px;font-size: 15px;display:none;">身份审核</div>
                <tr>
                    <td><span>姓名：</span></td>
                    <td id="username">123</td>
                </tr>
                <tr>
                    <td>电话：</td>
                    <td id="userphone"></td>
                </tr>
                <tr>
                    <td>身份证：</td>
                    <td id="usernumber"></td>
                </tr>
                <tr>
                    <td>地区：</td>
                    <td id="useradd"></td>
                </tr>
                <tr>
                    <td>身份证号：</td>
                    <td>
                        <input type="hidden" name="id" id="userid">
                        <div style="margin-left:0;" class="layui-input-block">
                            <input type="radio" name="status" value="10" title="通过">
                            <input type="radio" name="status" value="77" title="驳回">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <button type="button" class="qx layui-btn">取消</button>
                        <button type="submit" class="addform layui-btn">提交</button>
                    </td>
                </tr>
            </table>
            </form>
        </div>
</div>
<div id="menu_left">
    {block name="left"}
    <div id="menu_logo">
        <div class="menu_logo">
            <img src="/images/logo/01.png" alt="">
            <div>Apple</div>
        </div>

    </div>
    <!--左边分栏-->
    <ul class="layui-nav layui-nav-tree menu_left" lay-filter="test">
        <!-- 侧边导航: <ul class="layui-nav layui-nav-tree layui-nav-side"> -->
        {if isset($menu)}
        {if $menu !== 'no'}
        {foreach $menu as $v}
        {if $v.level !== 3}
        <li class="layui-nav-item dianji" style="position: relative;">
            <img src="{$v.icon}" style="position: absolute;" alt="">
            <a style="padding-left:40px;" href="{if $v.pid}javascript:;{else}{:url($v.url)}{/if}">
            {$v.name}
            </a>
            {if $v.pid}
            <dl class="layui-nav-child">
                {foreach $v.pid as $arrv}
                <dd style="position: relative;">
                    <img style="position: absolute;" src="{$arrv.icon}" style="position: absolute;" alt="">
                    <a style="padding-left:60px;" href="{:url($arrv.url)}">{$arrv.name}</a>
                </dd>
                {/foreach}
            </dl>
            {/if}
        </li>
        {/if}
        {/foreach}
        {/if}
        {/if}
    </ul>
    <script>
        $(".qx").click(function(){
            $("#groupadd").hide();
            $("#hd").hide();
            $("#table_one").hide();
            $("#table_one_title").hide();
            $("#table_two").hide();
            $("#table_two_title").hide();
            $("#jurisdiction_title").hide();
        })
        //注意：导航 依赖 element 模块，否则无法进行功能性操作
        layui.use('element', function(){
            var element = layui.element;

            //…
        });
        $(".dianji").find('a').click(function(){
            var href = $(this).attr('href');
            $("iframe").attr('src',href);
            console.log(href);
            return false;

        })
        layui.use('layedit', function(){
            var layedit = layui.layedit;
            layedit.build('demo',{
                uploadImage:{}
            }); //建立编辑器
            layedit.set({
                uploadImage: {
                    url: "{:url('images')}" //接口url
                    ,type: 'post' //默认post
                    ,done: function(res){
                        console.log(res);
                        //如果上传失败
                        if(res.code > 0){
                            return layer.msg('上传失败');
                        }
                        //上传成功
                    }
                }
            });
            var layeditDemo= layedit.build('demo');
            $(" .layui-layedit .layui-unselect.layui-layedit-tool")
                .append('<i class="layui-icon layedit-tool-preview" title="预览"  style="font-size:18px"></i>');
            $(document).on('click','.layedit-tool-preview',function(data){
                parent.layer.open({
                    title: '在线预览'
                    , shade: 0.2
                    ,move: false
                    ,content: layedit.getContent(layeditDemo)
                    ,offset: 'rt'
                    ,area: ['990px',(top.window.innerHeight*0.50).toString()]
                });
            });
        });
    </script>
    {/block}
</div>
<div id="menu_right" style="overflow: hidden;">
    <!--右边内容-->
    {if isset($menu)}
    {if $menu !== 'no'}
    {if isset($iframe)}
    <iframe src="{$iframe}">
    {else}
    {if isset($menuurl)}
    <iframe src="{:url($menuurl)}">
    {else}
    <iframe src="{:url('index/setting',['id'=>0])}">
    {/if}
    {/if}
    </iframe>
        {else}
        <button type="button" class="exits layui-btn layui-btn-normal">该账户没有权限-退出</button>
        {/if}
        {else}
        <button type="button" class="exits layui-btn layui-btn-normal">该账户没有权限-退出</button>
        {/if}
</div>
<script>
    $(".exits").click(function(){
        location.href = "{:url('user/exits')}";
    })
</script>
</body>
</html>